package com.example.demo.controller;

import com.example.demo.entity.IconList;
import com.example.demo.entity.SwiperIconList;
import com.example.demo.service.impl.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author littlebadfox
 * @date 2022-04-24-0:36
 * @desc
 */
@RestController
@RequestMapping("home")
public class HomeController {

    @Autowired
    HomeService homeService;

    //返回home中的图标src和text
    @RequestMapping("/geticon")
    public List<IconList> getIconList(){
        return homeService.getIconlist();
    }

    //返回home首页的轮播图
    @RequestMapping("/getSwiper")
    public List<SwiperIconList> getSwiperIconList(){
        return  homeService.getSwiperIconList();
    }
}
